﻿//===================================================================
// 西交通开发框架-XCI.Parent 2019 版权所有     
//===================================================================
using System;
using System.ComponentModel.DataAnnotations;
using XCI.Data.Entity;

namespace XCI.Sys.Model
{
    /// <summary>
    /// 系统应用程序
    /// </summary>
    [Table("系统应用程序")]
    public class SysApp
    {
        /// <summary>
        /// 应用主键
        /// </summary>
        [Primary]
        [Column("应用主键", false)]
        public string Id { get; set; }

        /// <summary>
        /// 应用名称
        /// </summary>
        [Column("应用名称")]
        [Required(ErrorMessage = "请输入应用名称")]
        [StringLength(100, ErrorMessage = "应用名称不能超过100个字符")]
        public string Name { get; set; }

        /// <summary>
        /// 密钥
        /// </summary>
        [Column("密钥")]
        [Required(ErrorMessage = "请输入密钥")]
        [StringLength(100, ErrorMessage = "密钥不能超过100个字符")]
        public string Secret { get; set; }

        /// <summary>
        /// 状态(0:禁用;1:启用)
        /// </summary>
        [Column("状态")]
        public bool? Status { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("备注")]
        [StringLength(500, ErrorMessage = "备注不能超过500个字符")]
        public string Remark { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public SysApp Clone()
        {
            return (SysApp)MemberwiseClone();
        }
    }
}
